﻿using System.Windows;
using System.Windows.Controls;
using LiveTiss.Schemas;

namespace LiveTiss.Guias.UserControls
{
    public partial class DiariaProrrogacao : UserControl
    {
        #region Value

        public ct_diariaProrrogacao Value
        {
            get { return (ct_diariaProrrogacao)GetValue(ValueProperty); }
            set { SetValue(ValueProperty, value); }
        }

        public static readonly DependencyProperty ValueProperty =
            DependencyProperty.Register("Value", typeof(ct_diariaProrrogacao), typeof(DiariaProrrogacao), new PropertyMetadata(null));

        #endregion

        public DiariaProrrogacao()
        {
            this.DataContext = this;
            this.InitializaValues();
            InitializeComponent();
        }

        private void InitializaValues()
        {
            if (this.Value == null)
            {
                this.Value = new ct_diariaProrrogacao()
                {
                    quantidadeDiaria = 0,
                    tipoAcomodacao = st_tipoAcomodacao.Item1
                };
            }
        }
    }
}
